﻿using Core.Business.CommentModule;
using Core.Business.EntrepotModule;
using Core.Business.Information;
using Core.Business.LoggerModule;
using Core.Business.OrderModule;
using Core.Business.ProjectModule;
using Core.Business.PushModule;
using Core.Business.SDKService;
using Core.Business.SocketModule;
using Core.Business.UserModule;
using Core.Framework.Distributed;
using Core.Framework.Model.Common;
using Core.IBusiness.IComment;
using Core.IBusiness.IEntrepotModule;
using Core.IBusiness.IInformation;
using Core.IBusiness.ILoggerModule;
using Core.IBusiness.IOrderModule;
using Core.IBusiness.IProjectModule;
using Core.IBusiness.IPushModule;
using Core.IBusiness.ISDK;
using Core.IBusiness.ISocketModule;
using Core.IBusiness.IUserModule;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;

namespace Core.Web
{
    public class DIRegisterBusiness : IDIRegister
    {
        public void Execute(IServiceCollection services)
        {
            services

                // 日志
                .AddScoped<ILog, Loggers>()

                // 项目
                .AddScoped<IProject, Project>()
                .AddScoped<IProjectUser, ProjectUsers>()
                .AddScoped<IProjectUserApiService, ProjectUserApiService>()

                // 队列、通知
                .AddScoped<IQueue, Queue>()
                .AddScoped<IPushFactory, PushFactory>()
                .AddScoped<IArticlePush, Article>()
                .AddScoped<IRelationshipPush, Relationship>()
                .AddScoped<IOperatePush, Operate>()
                .AddScoped<IShopPush, Shop>()

                // 订单、库存
                .AddScoped<IOrder, Order>()
                .AddScoped<IOrderCoupon, OrderCouponBusiness>()
                .AddScoped<IEntrepot, Entrepot>()
                .AddScoped<IEntrepotOperation, EntrepotOperation>()

                // 关系管理
                .AddScoped<ISocketGroup, SocketGroup>()
                .AddScoped<ISocketRelationship, SocketRelationship>()
                .AddScoped<ISocketMessage, SocketMessage>()

                // 信息管理
                .AddScoped<ICommentModule, Comment>()
                .AddScoped<IInformation, Information>()

                // 支付、短信
                .AddScoped<IPay, Pay>()
                .AddScoped<ISMS, SMS>()

                // 用户
                .AddScoped<ISocketUser, SocketUsers>()

                // 锁
                .AddScoped<ILock, Lock>();
        }

    }
}
